package com.kjtpay.design_pattern.memento;

/**
 * 角色状态存储箱类; Memento类
 */
class RoleStateMemento {
    private int vitality;//生命力
    private int attack;//攻击力
    private int defense;// 防御力

    /**
     * 将生命力、攻击力、防御力存入状态存储箱对象中
     */
    public RoleStateMemento(int vitality, int attack, int defense) {
        this.vitality = vitality;
        this.attack = attack;
        this.defense = defense;
    }

    /**
     * getter
     */
    public int getVitality() {
        return vitality;
    }

    public int getAttack() {
        return attack;
    }

    public int getDefense() {
        return defense;
    }
}
